package sfy.md.structure.theflyweight;

import sun.nio.cs.ext.MacArabic;

public class Client {

     public  static  void main(String[] args){
        /**获取男人*/
        FlyWeightManager flyWeightManager = new Man();
        TheFlyweight theFlyweight = new People(flyWeightManager);
        theFlyweight.setOne();

        Object o=   theFlyweight.getOne();
        System.out.println("o:"+o);

        /**获取女人*/
         FlyWeightManager flyWeightManager2 = new Woman();
         TheFlyweight theFlyweight2 = new People(flyWeightManager2);
         theFlyweight2.setOne();

         Object o2 =   theFlyweight2.getOne();
         System.out.println("o2:"+o2);
     }

}
